package com.zhl.scanner;
//1.导包
import java.util.Scanner;

public class ScannerDemo1 {
    public static void main(String[] args) {
       //2.创建Scanner对象
        Scanner sc = new Scanner(System.in);
        //3.调用sc，使用Scanner对象读取输入
        System.out.println("请输入一个整数：");
        int num = sc.nextInt();
        System.out.println("您输入的整数是：" + num);

        System.out.println("请输入你的名字：");
        String name = sc.next();
        System.out.println("你好，" + name + "！");
    }
}
